package rentadomus

class Apartament{

    Dwelling idDwelling
    Double managementPrice
    int floor
    String apartamentType
    
    static constraints = {
        apartamentType  inList:["Duplex","Single"]
        floor blank: false, min:1
    }
    
    static mapping = {
        version false
        managementPrice column: 'management_price'
        idDwelling column:'id_dwelling'
    }  
    
    public String toString(){
        "${idDwelling.getIdPlace().toString()}"
    }
}
